<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- <custom-count></custom-count> -->
    <com-a></com-a>
  </div>
  <script>

    Vue.component('customCount', {
      template: `<div>0</div>`
    })

    Vue.component('com-a', {
      template: "<div>a <com-b></com-b></div>",
      components: {
        //组件的局部注册
        'com-b': {
          template: '<div>b</div>'

        }
      }
    })

    var vm = new Vue({
      el: "#app"
    })
  </script>
</body>

</html>